package com.seata.order.service.impl;

import com.seata.order.dao.OrderDao;
import com.seata.order.pojo.Order;
import com.seata.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description:
 * @ClassName: OrderServiceImpl
 * @Author:
 * @Date:
 * @Version: 1.0
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderDao orderDao;
    @Override
    public int addOrder(Order order) {
        Order o = new Order();
        o.setProductId(order.getProductId());
        o.setTotalAmount(order.getTotalAmount());
        o.setStatus(order.getStatus());
        
        return orderDao.addOrder(o);
    }
}
